package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-12-21
 * Time: 9:40
 */
class Father{
    int a = 100;
    int b = 200;
    public void print(){
        System.out.println(a+" "+b);
    }
}
class Child extends Father{
    int b = 300;
    int c = 400;
    public void print(){
        System.out.println(a + " " + b + " "+c);
    }
    public void printExtend(){
        System.out.println(c);
    }
}
public class Main {
    public static void main(String[] args) {
        Father obj = new Child();
        System.out.println(obj.a);
        System.out.println(obj.b);
        obj.print();
        //obj.printExtend();
    }
}
